<template>
  <div class="linkcontainer">
    <van-nav-bar
      title="友情链接"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <div>
      <van-cell
        title="乐吾乐2D可视化组态软件API"
        is-link
        url="https://doc.le5le.com/document/118756411#0c10fe1b"
      />
      <van-cell
        title="诺依框架入门及使用"
        is-link
        url="https://blog.csdn.net/lmxnsI/article/details/145198051"
      />
      <van-cell
        title="Trae IDE 插件开发文档"
        is-link
        url="https://docs.trae.com.cn/ide/manage-extensions"
      />
      <van-cell
        title="设计稿转代码平台"
        is-link
        url="https://f2c.yy.com/guide/start/quick-start.html"
      />
      <van-cell
        title="MateChat 前端智能化场景解决方案UI库，轻松构建你的AI应用"
        is-link
        url="https://gitcode.com/DevCloudFE/MateChat"
      />
      <van-cell
        title="NoCode 零代码应用生成平台"
        is-link
        url="https://nocode.cn/#/"
      />
      <van-cell
        title="写给自己的flex布局"
        is-link
        url="https://www.zhangxinxu.com/wordpress/2018/10/display-flex-css3-css/"
      />
      <van-cell
        title="Cursor智能AI助手"
        is-link
        url="https://www.cursor.com/cn/features"
      />
    </div>

    <div>
      <van-barrage v-model="list" ref="barrage" :auto-play="true" delay="1500">
        <div class="video" style="width: 100%; height: 150px"></div>
      </van-barrage>
      <van-space style="margin-top: 10px"> </van-space>
    </div>
    <div>
      <van-cell-group inset>
        <van-field
          v-model="message"
          rows="2"
          autosize
          label="留言"
          type="textarea"
          maxlength="50"
          placeholder="说点什么吧~"
          show-word-limit
        >
          <template #button>
            <van-button size="small" type="primary" @click="sendfriend"
              >发布</van-button
            >
          </template>
        </van-field>
      </van-cell-group>
    </div>
  </div>
</template>


<script setup>
import { onMounted, reactive, ref } from "vue";
import { getyao } from "../api/getlogin";
import { useRouter } from "vue-router";
const router = useRouter();
const message = ref("");
const onClickLeft = () => history.back();
const defaultList = [
  { id: 100, text: "轻量" },
  { id: 101, text: "可定制的" },
  { id: 102, text: "移动端" },
  { id: 103, text: "Vue" },
  { id: 104, text: "组件库" },
  { id: 105, text: "VantUI" },
  { id: 106, text: "666" },
];

const list = ref([...defaultList]);
const barrage = ref();
const add = () => {
  list.value.push({ id: Math.random(), text: "Barrage" });
};

// const [isPlay, toggle] = useToggle(false);

// watch(isPlay, () => {
//   if (isPlay.value) barrage.value?.play();
//   else barrage.value?.pause();
// });
const sendfriend = () => {
  list.value.push({ id: Math.random(), text: message.value });
  message.value = "";
};
onMounted(async () => {});
</script>
 


<style scoped>
::v-deep .van-cell__title {
  text-align: left;
}
</style>